import axios from "./axios";
//添加部门
export function addDepartment(data) {
  return axios({
    url: "/add/department",
    method: "post",
    data,
  });
}
// 查询部门
export function getDepartment(params) {
  return axios({
    url: "/department",
    method: "get",
    params,
  });
}
// 删除部门
export function delDepartment(data) {
  return axios({
    url: "/department",
    method: "delete",
    data,
  });
}
// 修改部门
export function updateDepartment(data) {
  return axios({
    url: "/update/department",
    method: "post",
    data,
  });
}
//添加人员
export function addUserInfo(data) {
  return axios({
    url: "/add/user",
    method: "post",
    data,
  });
}
// 查询人员
export function getUserList(params) {
  return axios({
    url: "/user",
    method: "get",
    params,
  });
}
// 删除人员
export function delUserInfo(data) {
  return axios({
    url: "/user",
    method: "delete",
    data,
  });
}
// 修改人员信息
export function updateUserInfo(data) {
  return axios({
    url: "/update/user",
    method: "post",
    data,
  });
}
// 登录
export function login(data) {
  return axios({
    url: "/login",
    method: "post",
    data,
  });
}
// 获取个人信息
export function getUserInfo(params) {
  return axios({
    url: "/userInfo",
    method: "get",
    params,
  });
}
// 上传文件
export function uploadFile(data) {
  return axios({
    url: "/upload",
    method: "post",
    data,
  });
}
// 查询视频源
export function getM3u8(data) {
  return axios({
    url: "/m3u8",
    method: "post",
    data,
  });
}
// 修改视频源
export function updateM3u8(data) {
  return axios({
    url: "/update/m3u8",
    method: "post",
    data,
  });
}
// 新增视频源
export function addM3u8(data) {
  return axios({
    url: "/add/m3u8",
    method: "post",
    data,
  });
}
// 删除视频源
export function delM3u8(data) {
  return axios({
    url: "/m3u8",
    method: "delete",
    data,
  });
}
// 查询车辆运行状态
export function vehicleInformation(data) {
  return axios({
    url: "/vehicleInformation",
    method: "post",
    data,
  });
}
// 修改车辆运行状态
export function updateVehicleInformation(data) {
  return axios({
    url: "/update/vehicleInformation",
    method: "post",
    data,
  });
}
// 添加报表
export function addreport(data) {
  return axios({
    url: "/add/report",
    method: "post",
    data,
  });
}
// 查询报表
export function getreport(data) {
  return axios({
    url: "/report",
    method: "post",
    data,
  });
}
// 删除报表
export function delreport(data) {
  return axios({
    url: "/report",
    method: "delete",
    data,
  });
}
// 修改报表
export function updatereport(data) {
  return axios({
    url: "/update/report",
    method: "post",
    data,
  });
}
// 添加日历
export function addcalendar(data) {
  return axios({
    url: "/add/calendar",
    method: "post",
    data,
  });
}
// 查询日历
export function getcalendar(data) {
  return axios({
    url: "/calendar",
    method: "post",
    data,
  });
}
